package service

import (
	"jtvss/api/operation/model"
	"jtvss/pkg/orm"
)

type Vehicle struct {
	ID          int    `json:"deviceId"`
	DeviceNo    string `json:"deviceNo"`
	DeviceName  string `json:"deviceName"`
	ChlCount    int    `json:"chlCount"`
	ChlNames    string `json:"chlNames"`
	OrganizeID  int    `json:"organizeId"`  // 分组Id
	StationGUID string `json:"stationGuid"` // 工作站guid
}

func VehicleOfOrganize(organizeGUID string) []Vehicle {
	var res []Vehicle
	orm.DB().Model(&model.Vehicle{}).Where("organize_guid = ?", organizeGUID).Scan(&res)
	return res
}
